﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using e.Store.Model.Entities;
using e.Store.DataAccess;

namespace e.Store.Domain.Repositories
{
    public class MenuRepository : Repository<Menu>
    {
        eStote_DBEntities _context;

        public MenuRepository(eStote_DBEntities context)
            : base(context)
        {
            dbSet = context.Set<Menu>();
            _context = context;

        }

        public List<Menu> GetAllMenus()
        {
            IQueryable<Menu> menus;

            //using (var context = new eStote_DBEntities())
            //{
            // context.Database.Initialize(true);
            menus = _context.Menus;
            return menus.ToList();
            //}

        }

        public void Dispose()
        {
            //context.Dispose();
        }
    }
}
